{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "wGiExl72jSfD"
   },
   "source": [
    "[Open In Colab](https://colab.research.google.com/github/shibing624/textgen/blob/main/examples/T5/T5_Finetune_Chinese_Poem.ipynb)\n",
    "\n",
    "\n",
    "# T5 写诗\n",
    "- 设计：Pretrained T5 + “写诗 prompt” fine-tuning\n",
    "  - 对比我的 [transformer training from scratch](https://github.com/hululuzhu/chinese-ai-writing-share/blob/main/%E4%B8%AD%E6%96%87%E5%86%99%E8%AF%97Transformer_Source_Code_Share_V1.ipynb)\n",
    "  - 想要加入作者作为可选输入\n",
    "    - 每个文章分两次输入，一次作者名字，一次“None”名字（通用）\n",
    "- 数据：[诗歌github](https://github.com/chinese-poetry/chinese-poetry)\n",
    "- 相关内容\n",
    "  - [Huggingface](https://huggingface.co/)\n",
    "  - LangZhou Chinese [MengZi T5 pretrained Model](https://huggingface.co/Langboat/mengzi-t5-base) and [paper](https://arxiv.org/pdf/2110.06696.pdf)\n",
    "  - [textgen](https://github.com/shibing624/textgen) \n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "-1qVyC6tqujH"
   },
   "source": [
    "## Prepare Data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "id": "ib8ELKoFPACz",
    "outputId": "0fad6bac-1322-4c0c-a90c-c74237edab16"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Sat Aug 13 09:06:22 2022       \n",
      "+-----------------------------------------------------------------------------+\n",
      "| NVIDIA-SMI 440.118.02   Driver Version: 440.118.02   CUDA Version: 10.2     |\n",
      "|-------------------------------+----------------------+----------------------+\n",
      "| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |\n",
      "| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |\n",
      "|===============================+======================+======================|\n",
      "|   0  Tesla V100-SXM2...  On   | 00000000:00:09.0 Off |                    0 |\n",
      "| N/A   33C    P0    22W / 300W |      0MiB / 32510MiB |      0%      Default |\n",
      "+-------------------------------+----------------------+----------------------+\n",
      "                                                                               \n",
      "+-----------------------------------------------------------------------------+\n",
      "| Processes:                                                       GPU Memory |\n",
      "|  GPU       PID   Type   Process name                             Usage      |\n",
      "|=============================================================================|\n",
      "|  No running processes found                                                 |\n",
      "+-----------------------------------------------------------------------------+\n"
     ]
    }
   ],
   "source": [
    "!nvidia-smi"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "id": "3Jn7mdTkq3Za"
   },
   "outputs": [],
   "source": [
    "IS_TEST_FLOW = True  #@param {type: \"boolean\"}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "id": "0ZR4K8fyO7o3",
    "outputId": "eda93994-a820-483b-a898-76bcbbd5ce89"
   },
   "outputs": [],
   "source": [
    "# from google.colab import drive\n",
    "# drive.mount('/content/drive')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "id": "wW3P2Ld9jMLu"
   },
   "outputs": [],
   "source": [
    "import json\n",
    "import urllib.request\n",
    "from loguru import logger\n",
    "import pandas as pd\n",
    "!pip install -q \"tqdm>=4.36.1\" > /tmp/na\n",
    "from tqdm.notebook import tqdm\n",
    "!pip install -q chinese-converter > /tmp/na\n",
    "import chinese_converter  # 繁体到简体需要\n",
    "import pickle\n",
    "import os\n",
    "import pandas as pd\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "id": "9a58tcJKk7ll"
   },
   "outputs": [],
   "source": [
    "# https://github.com/chinese-poetry/chinese-poetry\n",
    "POEM_CONTENT = {\n",
    "    'tang': {\n",
    "        'total': 58,\n",
    "        'pattern': \"https://raw.githubusercontent.com/chinese-poetry/chinese-poetry/master/json/poet.tang.{0}.json\"\n",
    "    },\n",
    "    'song': {\n",
    "        'total': 255,\n",
    "        'pattern': \"https://raw.githubusercontent.com/chinese-poetry/chinese-poetry/master/json/poet.song.{0}.json\"\n",
    "    }\n",
    "}\n",
    "\n",
    "\n",
    "def get_poems(is_test=True, verbose=True):\n",
    "    df_list = []\n",
    "    for dynasty in POEM_CONTENT:\n",
    "        size = POEM_CONTENT[dynasty]['total']\n",
    "        pbar = tqdm(total=size, desc=\"Dynasty \" + dynasty)\n",
    "        for i in range(size):\n",
    "            url = POEM_CONTENT[dynasty]['pattern'].format(i * 1000)\n",
    "            if verbose:\n",
    "                print(f\"download {url} now\")\n",
    "            df_list.append(pd.read_json(url))\n",
    "            pbar.update(1)\n",
    "    return pd.concat(df_list)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 99,
     "referenced_widgets": [
      "323d82ca0d4f45a4bc3a9e0c3fa7223f",
      "d791ebd524c14fb39fa057b6d768d7e1",
      "dd67da684d514c0e9104af667687ec66",
      "6fdf9feaca294f57a4bef18d4278964f",
      "efc374010b0a48bb8185cb251176a5c6",
      "70a47bb0c68244f1b2e3bd063c703204",
      "ef34932d46c24af7ba5ecfe75b66dd7d",
      "867e0bde887f4cf99642971803035856",
      "ac7cda3ef7b4438da21b97343149c342",
      "fe4e464186c34afa94351f1816565336",
      "2c7065d205de48e3be3f24e552dfe2eb",
      "edb118578ca44cffa3ed79797997ce77",
      "7bd662007194408eabd5b4adf81f73dd",
      "16b9d8d8b1154477b6feb23b76ed6f7a",
      "3286b506ffc04ab486d307d42e0ffa52",
      "0c3e05f620254eb0b9b0ba1a9e23655e",
      "8f2042c820b643669ebbbd18d61770e3",
      "babcd71231734f01b65bd59b87ab5237",
      "d9e6782917cb4db4a598efa86956e8b0",
      "619a29e3e6864583b3c83d27c4b062fa",
      "74f4c31592a14f61bd1c93880b4099a6",
      "ac4f0c8888684075bd0a5bf047763641"
     ]
    },
    "id": "GrbtEs6flK24",
    "outputId": "c44d8c4e-ba45-43dc-f61a-ae8a080b33b4"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "my_df size 311660\n"
     ]
    }
   ],
   "source": [
    "poem_file = 'poems.csv'\n",
    "if os.path.exists(poem_file):\n",
    "    df = pd.read_csv(poem_file)\n",
    "else:\n",
    "    df = get_poems(is_test=IS_TEST_FLOW, verbose=False)\n",
    "    df['concat_paragraphs'] = [''.join(map(str, l)) for l in df['paragraphs']]\n",
    "    df = df[['author', 'title', 'concat_paragraphs']]\n",
    "\n",
    "    def convert_schinese(tchinese):\n",
    "        return chinese_converter.to_simplified(tchinese)\n",
    "\n",
    "    df['s_content'] = df.apply(lambda row: convert_schinese(''.join(row.concat_paragraphs)), axis=1)\n",
    "    df['s_title'] = df.apply(lambda row: convert_schinese(''.join(row.title)), axis=1)\n",
    "    df['s_author'] = df.apply(lambda row: convert_schinese(''.join(row.author)), axis=1)\n",
    "    df.to_csv(poem_file, index=False)\n",
    "\n",
    "my_df = df.astype('string')\n",
    "my_df = my_df.dropna()\n",
    "print(\"my_df size\", len(my_df))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "id": "KVZrYrYRmBuN"
   },
   "outputs": [],
   "source": [
    "MAX_AUTHOR_CHAR = 4\n",
    "MAX_TITLE_CHAR = 12\n",
    "MIN_CONTENT_CHAR = 10\n",
    "MAX_CONTENT_CHAR = 64\n",
    "\n",
    "\n",
    "def trim_author_fn(row):\n",
    "    return row.s_author[:MAX_AUTHOR_CHAR]\n",
    "\n",
    "\n",
    "def trim_title_fn(row):\n",
    "    trimed_title = row.s_title[:MAX_TITLE_CHAR].replace(\" \", \"\").replace(\"(\", \"\").replace(\")\", \"\")\n",
    "    return trimed_title\n",
    "\n",
    "\n",
    "def trim_content_fn(row):\n",
    "    trimed_content = row.s_content[:MAX_CONTENT_CHAR]\n",
    "    return trimed_content\n",
    "\n",
    "\n",
    "# Trim the size, a soft copy to avoid the view/copy conflict warning\n",
    "my_df['s_author_trim'] = my_df.copy().apply(trim_author_fn, axis=1)\n",
    "my_df['s_title_trim'] = my_df.copy().apply(trim_title_fn, axis=1)\n",
    "my_df['s_content_trim'] = my_df.copy().apply(trim_content_fn, axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "id": "4YlgJ2BznDZE"
   },
   "outputs": [],
   "source": [
    "# Title cannot be empty\n",
    "empty_title_mask = (my_df['s_title_trim'].str.len() == 0)\n",
    "too_short_cotent_mask = (my_df['s_content_trim'].str.len() <= MIN_CONTENT_CHAR)\n",
    "invalid_mask = (('无正文' == my_df['s_content_trim']) | ('无正文' == my_df['s_author_trim']))\n",
    "too_short_mask =  empty_title_mask | too_short_cotent_mask | invalid_mask\n",
    "\n",
    "qualitied_df = my_df.loc[~too_short_mask][['s_author_trim', 's_title_trim', 's_content_trim']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 143
    },
    "id": "kj00wicXAD5S",
    "outputId": "0e87b85f-a577-4d37-c91b-a0623aed7255"
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>s_author_trim</th>\n",
       "      <th>s_title_trim</th>\n",
       "      <th>s_content_trim</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>41989</th>\n",
       "      <td>李中</td>\n",
       "      <td>秋日途中</td>\n",
       "      <td>信步腾腾野岸边，离家都爲利名牵。疎林一路斜阳裏，飒飒西风满耳蝉。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>129526</th>\n",
       "      <td>徐评</td>\n",
       "      <td>宁国院</td>\n",
       "      <td>岑寂千山曲，萦纡一径微。楼台青嶂合，窗户乱云飞。野色侵僧衲，池光射客衣。偶来修吏隠，到此益忘机。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>87493</th>\n",
       "      <td>司马光</td>\n",
       "      <td>和吴省副梅花半开招凭由张</td>\n",
       "      <td>帝乡春色岭头梅，高压年华犯雪开。正与嘉宾思共醉，不须芳物重相催。从车贮酒传呼出，侧弁簪花倒载...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       s_author_trim  s_title_trim  \\\n",
       "41989             李中          秋日途中   \n",
       "129526            徐评           宁国院   \n",
       "87493            司马光  和吴省副梅花半开招凭由张   \n",
       "\n",
       "                                           s_content_trim  \n",
       "41989                    信步腾腾野岸边，离家都爲利名牵。疎林一路斜阳裏，飒飒西风满耳蝉。  \n",
       "129526   岑寂千山曲，萦纡一径微。楼台青嶂合，窗户乱云飞。野色侵僧衲，池光射客衣。偶来修吏隠，到此益忘机。  \n",
       "87493   帝乡春色岭头梅，高压年华犯雪开。正与嘉宾思共醉，不须芳物重相催。从车贮酒传呼出，侧弁簪花倒载...  "
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "qualitied_df.sample(3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "id": "JwLTpqrhAV0H"
   },
   "outputs": [],
   "source": [
    "TITLE_PROMPT = \"作诗：\"\n",
    "AUTHOR_PROMPT = \"作者：\"\n",
    "EOS_TOKEN = '</s>'\n",
    "\n",
    "\n",
    "def build_dataset_df(df, include_author=True):\n",
    "    dfc = df.copy()\n",
    "    dfc['prefix'] = TITLE_PROMPT\n",
    "    if include_author:\n",
    "        dfc['input_text'] = df['s_title_trim'] + EOS_TOKEN + AUTHOR_PROMPT + df['s_author_trim']\n",
    "    else:\n",
    "        dfc['input_text'] = df['s_title_trim']\n",
    "    dfc['target_text'] = df['s_content_trim']\n",
    "    dfc = dfc[['prefix', 'input_text', 'target_text']]\n",
    "    return dfc"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 206
    },
    "id": "U7Owp1_aB4Cg",
    "outputId": "7eaa07f3-c7c3-46fc-abab-aa4fa989586b"
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>prefix</th>\n",
       "      <th>input_text</th>\n",
       "      <th>target_text</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>作诗：</td>\n",
       "      <td>帝京篇十首一&lt;/s&gt;作者：太宗皇帝</td>\n",
       "      <td>秦川雄帝宅，函谷壮皇居。绮殿千寻起，离宫百雉余。连甍遥接汉，飞观迥凌虚。云日隐层阙，风烟出绮疎。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>作诗：</td>\n",
       "      <td>帝京篇十首二&lt;/s&gt;作者：太宗皇帝</td>\n",
       "      <td>岩廊罢机务，崇文聊驻辇。玉匣啓龙图，金绳披凤篆。韦编断仍续，缥帙舒还卷。对此乃淹留，欹案观坟典。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>作诗：</td>\n",
       "      <td>帝京篇十首三&lt;/s&gt;作者：太宗皇帝</td>\n",
       "      <td>移步出词林，停舆欣武宴。琱弓写明月，骏马疑流电。惊雁落虚弦，啼猿悲急箭。阅赏诚多美，于兹乃忘倦。</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  prefix         input_text                                       target_text\n",
       "0    作诗：  帝京篇十首一</s>作者：太宗皇帝  秦川雄帝宅，函谷壮皇居。绮殿千寻起，离宫百雉余。连甍遥接汉，飞观迥凌虚。云日隐层阙，风烟出绮疎。\n",
       "1    作诗：  帝京篇十首二</s>作者：太宗皇帝  岩廊罢机务，崇文聊驻辇。玉匣啓龙图，金绳披凤篆。韦编断仍续，缥帙舒还卷。对此乃淹留，欹案观坟典。\n",
       "2    作诗：  帝京篇十首三</s>作者：太宗皇帝  移步出词林，停舆欣武宴。琱弓写明月，骏马疑流电。惊雁落虚弦，啼猿悲急箭。阅赏诚多美，于兹乃忘倦。"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_author_title_content = build_dataset_df(qualitied_df, True)\n",
    "df_author_title_content[:3]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 206
    },
    "id": "LT5PfxPFDAlz",
    "outputId": "bc447cab-3aeb-46d1-9c4d-77b2287affc7"
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>prefix</th>\n",
       "      <th>input_text</th>\n",
       "      <th>target_text</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>作诗：</td>\n",
       "      <td>帝京篇十首一</td>\n",
       "      <td>秦川雄帝宅，函谷壮皇居。绮殿千寻起，离宫百雉余。连甍遥接汉，飞观迥凌虚。云日隐层阙，风烟出绮疎。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>作诗：</td>\n",
       "      <td>帝京篇十首二</td>\n",
       "      <td>岩廊罢机务，崇文聊驻辇。玉匣啓龙图，金绳披凤篆。韦编断仍续，缥帙舒还卷。对此乃淹留，欹案观坟典。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>作诗：</td>\n",
       "      <td>帝京篇十首三</td>\n",
       "      <td>移步出词林，停舆欣武宴。琱弓写明月，骏马疑流电。惊雁落虚弦，啼猿悲急箭。阅赏诚多美，于兹乃忘倦。</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  prefix input_text                                       target_text\n",
       "0    作诗：     帝京篇十首一  秦川雄帝宅，函谷壮皇居。绮殿千寻起，离宫百雉余。连甍遥接汉，飞观迥凌虚。云日隐层阙，风烟出绮疎。\n",
       "1    作诗：     帝京篇十首二  岩廊罢机务，崇文聊驻辇。玉匣啓龙图，金绳披凤篆。韦编断仍续，缥帙舒还卷。对此乃淹留，欹案观坟典。\n",
       "2    作诗：     帝京篇十首三  移步出词林，停舆欣武宴。琱弓写明月，骏马疑流电。惊雁落虚弦，啼猿悲急箭。阅赏诚多美，于兹乃忘倦。"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_title_content = build_dataset_df(qualitied_df, False)\n",
    "df_title_content[:3]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "id": "vsAXpMJSDMdS"
   },
   "outputs": [],
   "source": [
    "merged_df = pd.concat([df_author_title_content, df_title_content])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 423
    },
    "id": "t7UAy0RNDchP",
    "outputId": "226899f6-43c3-4dd4-8936-c0c780c492fd"
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>prefix</th>\n",
       "      <th>input_text</th>\n",
       "      <th>target_text</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>作诗：</td>\n",
       "      <td>帝京篇十首一&lt;/s&gt;作者：太宗皇帝</td>\n",
       "      <td>秦川雄帝宅，函谷壮皇居。绮殿千寻起，离宫百雉余。连甍遥接汉，飞观迥凌虚。云日隐层阙，风烟出绮疎。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>作诗：</td>\n",
       "      <td>帝京篇十首二&lt;/s&gt;作者：太宗皇帝</td>\n",
       "      <td>岩廊罢机务，崇文聊驻辇。玉匣啓龙图，金绳披凤篆。韦编断仍续，缥帙舒还卷。对此乃淹留，欹案观坟典。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>作诗：</td>\n",
       "      <td>帝京篇十首三&lt;/s&gt;作者：太宗皇帝</td>\n",
       "      <td>移步出词林，停舆欣武宴。琱弓写明月，骏马疑流电。惊雁落虚弦，啼猿悲急箭。阅赏诚多美，于兹乃忘倦。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>作诗：</td>\n",
       "      <td>帝京篇十首四&lt;/s&gt;作者：太宗皇帝</td>\n",
       "      <td>鸣笳临乐馆，眺听欢芳节。急管韵朱弦，清歌凝白雪。彩凤肃来仪，玄鹤纷成列。去兹郑卫声，雅音方可悦。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>作诗：</td>\n",
       "      <td>帝京篇十首五&lt;/s&gt;作者：太宗皇帝</td>\n",
       "      <td>芳辰追逸趣，禁苑信多奇。桥形通汉上，峰势接云危。烟霞交隐映，花鸟自参差。何如肆辙迹？万里赏瑶池。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>311850</th>\n",
       "      <td>作诗：</td>\n",
       "      <td>状元峰</td>\n",
       "      <td>马蹄一日遍长安，萤火鸡窗千载寒。从此锦衣归故里，文峰高并彩云端。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>311851</th>\n",
       "      <td>作诗：</td>\n",
       "      <td>蜕龙洞</td>\n",
       "      <td>苍岩磊落任龙蟠，绵亘千年露未干。一自爲霖破壁去，至今风雨逼山寒。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>311852</th>\n",
       "      <td>作诗：</td>\n",
       "      <td>登竺云山</td>\n",
       "      <td>独上千峰与万峰，晴岚淡写海江容。偶从动问山居事，笑拍岩前一树松。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>311853</th>\n",
       "      <td>作诗：</td>\n",
       "      <td>寒云千叠山</td>\n",
       "      <td>松竹阴森护上方，老仙蓬髪一簪霜。闲来欹枕松风裏，归夢不知山水长。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>311854</th>\n",
       "      <td>作诗：</td>\n",
       "      <td>宣妙楼</td>\n",
       "      <td>云观烟楼是梵家，竹围如洗逼寒沙。因风绿浪摇晴麦，遇雨红香落涧花。人锁昼房听鸟语，僧归晚坞放蜂...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>620180 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       prefix         input_text  \\\n",
       "0         作诗：  帝京篇十首一</s>作者：太宗皇帝   \n",
       "1         作诗：  帝京篇十首二</s>作者：太宗皇帝   \n",
       "2         作诗：  帝京篇十首三</s>作者：太宗皇帝   \n",
       "3         作诗：  帝京篇十首四</s>作者：太宗皇帝   \n",
       "4         作诗：  帝京篇十首五</s>作者：太宗皇帝   \n",
       "...       ...                ...   \n",
       "311850    作诗：                状元峰   \n",
       "311851    作诗：                蜕龙洞   \n",
       "311852    作诗：               登竺云山   \n",
       "311853    作诗：              寒云千叠山   \n",
       "311854    作诗：                宣妙楼   \n",
       "\n",
       "                                              target_text  \n",
       "0        秦川雄帝宅，函谷壮皇居。绮殿千寻起，离宫百雉余。连甍遥接汉，飞观迥凌虚。云日隐层阙，风烟出绮疎。  \n",
       "1        岩廊罢机务，崇文聊驻辇。玉匣啓龙图，金绳披凤篆。韦编断仍续，缥帙舒还卷。对此乃淹留，欹案观坟典。  \n",
       "2        移步出词林，停舆欣武宴。琱弓写明月，骏马疑流电。惊雁落虚弦，啼猿悲急箭。阅赏诚多美，于兹乃忘倦。  \n",
       "3        鸣笳临乐馆，眺听欢芳节。急管韵朱弦，清歌凝白雪。彩凤肃来仪，玄鹤纷成列。去兹郑卫声，雅音方可悦。  \n",
       "4        芳辰追逸趣，禁苑信多奇。桥形通汉上，峰势接云危。烟霞交隐映，花鸟自参差。何如肆辙迹？万里赏瑶池。  \n",
       "...                                                   ...  \n",
       "311850                   马蹄一日遍长安，萤火鸡窗千载寒。从此锦衣归故里，文峰高并彩云端。  \n",
       "311851                   苍岩磊落任龙蟠，绵亘千年露未干。一自爲霖破壁去，至今风雨逼山寒。  \n",
       "311852                   独上千峰与万峰，晴岚淡写海江容。偶从动问山居事，笑拍岩前一树松。  \n",
       "311853                   松竹阴森护上方，老仙蓬髪一簪霜。闲来欹枕松风裏，归夢不知山水长。  \n",
       "311854  云观烟楼是梵家，竹围如洗逼寒沙。因风绿浪摇晴麦，遇雨红香落涧花。人锁昼房听鸟语，僧归晚坞放蜂...  \n",
       "\n",
       "[620180 rows x 3 columns]"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merged_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "train 613978 eval 6202\n",
      "train 300 eval 30\n"
     ]
    }
   ],
   "source": [
    "from sklearn.model_selection import train_test_split\n",
    "merged_df = merged_df.sample(frac=1) # Shuffle\n",
    "train_df, eval_df = train_test_split(merged_df, test_size=0.01)\n",
    "print(\"train\", len(train_df), \"eval\", len(eval_df))\n",
    "\n",
    "train_df = train_df.sample(300) if IS_TEST_FLOW else train_df\n",
    "eval_df = eval_df.sample(30) if IS_TEST_FLOW else eval_df\n",
    "print(\"train\", len(train_df), \"eval\", len(eval_df))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "f_vxHg9MDqTj"
   },
   "source": [
    "## Modeling"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "id": "pUt4xwq6Drrn"
   },
   "outputs": [],
   "source": [
    "# Quiet install textgen package\n",
    "!pip install -q textgen"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 35
    },
    "id": "H0NHrq6AD915",
    "outputId": "eadf22c4-4f89-4185-fa7c-ee0e5b6cf0cb"
   },
   "outputs": [],
   "source": [
    "import torch\n",
    "import sys\n",
    "sys.path.append('../..')\n",
    "from textgen.t5 import T5Model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "id": "wg4u8ZfsEA85"
   },
   "outputs": [],
   "source": [
    "model_type = 't5'\n",
    "model_name = \"Langboat/mengzi-t5-base\"\n",
    "output_dir = 'outputs/mengzi_t5_poem/'\n",
    "max_seq_length = 50\n",
    "num_epochs = 10\n",
    "batch_size = 32"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 113,
     "referenced_widgets": [
      "f4c2d4d0e3eb483488808fccfb805039",
      "164b459cfb8a4a519e1e1dfb94ebf864",
      "275b4e7634324e51a3f2815a930046c9",
      "192177f838774e69b9dc03164e12fe3f",
      "54c2e0f0aabe4b8db056a28e8470184d",
      "04bcb8d3d0ee4cab90101a22d358cbf4",
      "d736a23a0e8f40b2bf65b3064f3513c7",
      "2b4801d6b14c4e00ba6881058ccef2c9",
      "a38e578963634fe8aaee4598915e8a63",
      "b63e60bfeeae4abc89db4684ed37ffac",
      "8ae1328f6e2a4016932f5154e5e48a46",
      "f469bbd3377e48e9a0e1f1ec447a5d4c",
      "ab58b2c948274a1e858bb27bc5db1483",
      "8d64b2cb15a544688df9b0ef4f5ac5d4",
      "3ff6b9f98fb246149676f2d0d6ea5a74",
      "2709c8c8b756415aac3244c322d0cd6e",
      "db7b430a21394d47b3f510d3cd54918d",
      "9fb2562090c4469786da59aae1c3cb50",
      "516004a73b27457d8ad8fe15256dc54b",
      "d9870f9f7cbb45758e676b3ca54f9be1",
      "09a526ec6d164b2090962a5781c3097a",
      "7d9f979f8c66439a846e7ab39b9043d7",
      "eef25f8bfc564f2bace3b033a0df5eb8",
      "3596547df9124079846a0168971218ec",
      "95ff98cd1eba4fe999654378fe90ea50",
      "d84fd422478e4498bd387d71bc6973eb",
      "22ec341fcbd140649bc29b866efbba4c",
      "6a5d1f41985540309d335af09ee3b9f8",
      "d21de94ef23b41d098c5ce073e48ad95",
      "50393dcc6d8f480fa4d75d3cd1091520",
      "af835a288f37413d86415bf06fd69524",
      "790a42639e5641219c4ea39cc9d723f9",
      "a70858676a544d869b439aa65006b647"
     ]
    },
    "id": "wcJmpBMLEFi4",
    "outputId": "4de74b24-7f74-4368-8ddb-055e45ee67b9"
   },
   "outputs": [],
   "source": [
    "model_args = {\n",
    "    \"reprocess_input_data\": True,\n",
    "    \"overwrite_output_dir\": True,\n",
    "    \"max_seq_length\": max_seq_length,\n",
    "    \"max_length\": max_seq_length,\n",
    "    \"train_batch_size\": batch_size,\n",
    "    \"num_train_epochs\": num_epochs,\n",
    "    \"save_eval_checkpoints\": False,\n",
    "    \"save_model_every_epoch\": False,\n",
    "    \"evaluate_generated_text\": True,\n",
    "    \"evaluate_during_training\": True,\n",
    "    \"evaluate_during_training_verbose\": True,\n",
    "    \"use_multiprocessing\": False,\n",
    "    \"save_best_model\": True,\n",
    "    \"output_dir\": output_dir,\n",
    "    \"use_early_stopping\": True,\n",
    "}\n",
    "# model_type: t5  model_name: Langboat/mengzi-t5-base\n",
    "model = T5Model(model_type, model_name, args=model_args)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "id": "b8ZQq6mYEHiO",
    "outputId": "8a4c827f-4ec6-4500-cc6b-9b14773f53ee"
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'input_ids': [1012, 955, 406, 921, 23, 3, 1440, 2180, 799, 355, 4008, 4, 1, 1448, 4152, 690, 3934, 4990, 3, 17544, 178, 2572, 769, 4, 1], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.tokenizer(\"桥形通汉上，峰势接云危。</s>烟霞交隐映，花鸟自参差。\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 35
    },
    "id": "hU7L1roeEPhY",
    "outputId": "9d19da92-8533-48de-db81-319031ea6ddb"
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'桥形通汉上,峰势接云危。</s> 烟霞交隐映,花鸟自参差。</s>'"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.tokenizer.decode([1012, 955, 406, 921, 23, 3, 1440, 2180, 799, 355, 4008, 4, 1, 1448, 4152, 690, 3934, 4990, 3, 17544, 178, 2572, 769, 4, 1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "id": "KXzTBimnFQbS"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "inputs: ['过温汤']\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "ff47313df7e44702ba2add0ed4036b1c",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Generating outputs:   0%|          | 0/1 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "outputs: ['我曾']\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/search/odin/anaconda3/envs/py39/lib/python3.9/site-packages/transformers/tokenization_utils_base.py:3557: FutureWarning: \n",
      "`prepare_seq2seq_batch` is deprecated and will be removed in version 5 of HuggingFace Transformers. Use the regular\n",
      "`__call__` method to prepare your inputs and the tokenizer under the `as_target_tokenizer` context manager to prepare\n",
      "your targets.\n",
      "\n",
      "Here is a short example:\n",
      "\n",
      "model_inputs = tokenizer(src_texts, ...)\n",
      "with tokenizer.as_target_tokenizer():\n",
      "    labels = tokenizer(tgt_texts, ...)\n",
      "model_inputs[\"labels\"] = labels[\"input_ids\"]\n",
      "\n",
      "See the documentation of your specific tokenizer for more details on the specific arguments to the tokenizer of choice.\n",
      "For a more complete example, see the implementation of `prepare_seq2seq_batch`.\n",
      "\n",
      "  warnings.warn(formatted_warning, FutureWarning)\n"
     ]
    }
   ],
   "source": [
    "def predict_now(sentences, model=model, prefix=TITLE_PROMPT):\n",
    "    sentences_add_prefix = [prefix + \": \" + i for i in sentences]\n",
    "    print(\"inputs:\", sentences)\n",
    "    print(\"outputs:\", model.predict(sentences_add_prefix))\n",
    "\n",
    "predict_now([\"过温汤\"], model=model)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Training"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 413,
     "referenced_widgets": [
      "3c1198c7ce7a4093b1fdba455c074a35",
      "0df136c92bef46eb8f0234f45874d07c",
      "0d75d646fdd845c5946bffaf83c360f4",
      "5cb75bb247bf455789f3343fbf458194",
      "d7a870de29374972903edf99e079381a",
      "31c4a5dd88824e58b56b3daf05ff7c6c",
      "1b620ef6bf224e20b93cf805a75a84d9",
      "61d54ac5d2c749e482b3b6d51bc6b825",
      "f214b269fd884b1c9a3a634d6784b18e",
      "2fd2168d36e2400eb267577e6a05d7f6",
      "c8a5e24211f24c488bb8c633d20d5185",
      "ce5700274ea747a6bafeb693bffab4e7",
      "aa33dc7fea834e2ab6d18c3332cc49fc",
      "3f2a2563bd1d4824807bcde335b33ca0",
      "637c5f82daa846a3b95ce6914bd55e2b",
      "0aebb7ab6f274f569061ba2f2c01a6e7",
      "32f8fb07ad064e85b9c8fc2bbf0b0ad8",
      "54230e6b55274cecb2f6f4c034badf63",
      "e4cd150df2d34df0bc66b22f60089e4e",
      "1d32d77e984649569fb475f479b5e05a",
      "604fcc04d62d46d8b87e402401c0c924",
      "8880de85a4b14d5e9703a5df16ceb6c6"
     ]
    },
    "id": "44fzxZP3EXoa",
    "outputId": "3e7fac2d-ebbd-40f5-d564-9306827d87c1"
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:07:37.017 | INFO     | textgen.t5.t5_utils:__init__:139 -  Creating features from dataset file at cache_dir/\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "1c28412cd8ee440b82344466e3b2c73b",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "  0%|          | 0/300 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:07:37.194 | INFO     | textgen.t5.t5_utils:__init__:170 -  Saving features into cached file cache_dir/Langboat_mengzi-t5-base_cached_50300\n",
      "2022-08-13 09:07:37.233 | INFO     | textgen.t5.t5_model:train:434 -  Training started\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "c802034960314b07b39be84952d03913",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Epoch:   0%|          | 0/10 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "f96574b0d065418698d64fbbbf8f0f07",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Running Epoch 0 of 10:   0%|          | 0/10 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:07:40.495 | INFO     | textgen.t5.t5_utils:__init__:139 -  Creating features from dataset file at cache_dir/\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "e90f2975411f40de8f2446a660573c8a",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "  0%|          | 0/30 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:07:40.530 | INFO     | textgen.t5.t5_utils:__init__:170 -  Saving features into cached file cache_dir/Langboat_mengzi-t5-base_cached_5030\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "c69e0fa73451414fac4d5a96247f8d1f",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Generating outputs:   0%|          | 0/4 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:07:40.943 | DEBUG    | __main__:count_matches:10 - labels: ['禀此分斗姿，用舍在所激。翻跳巧相中，一败躯命掷。晨鷄鸣不渝，霜隼时乃击。既无一二效，岂不愧肉食。', '东湖湖面波渺弥，东湖岸上春土肥。先生鉏云明月晓，种来蔬甲今成畦。把茅萧萧环四壁，此身不愿人间识。干坤清夷那复知，寸心杳渺黄尘隔。', '梢梢两竹枝，甘露叶间垂。草木有灵液，阴阳凝以时。深山与穷谷，往往尝有之。幸当君子轩，得爲众人知。物生随所托，晦显各有宜。聊以助歌', '精详语议四门开，舒惨阳和意外裁。远见风尘思往事，无穷日月去还来。乐耶指趣归三体，周旋道理遍九垓。贤圣人天常法则，卿云岭上白皑皑。', '使臣怀饯席，亚尹有前溪。客是仙舟裏，途从御苑西。泉声喧暗竹，草色引长堤。故绛青山在，新田绿树齐。天秋闻别鹄，关晓待鸣鸡。应叹沉冥', '饭余临槛数龟鱼，蛙黾跳浪亦任渠。笼寄双鳬古灵去，不因羽客换鹅书。', '阴阴作雨只漫漫，今日虽霜未苦寒。归去襄阳见吾弟，爲言道路且平安。', '天与孤高花独新，世间草木信非伦。影涵水月不受彩，气傲冰霜何待春。冷淡自能驱俗客，风骚端合付幽人。往来百匝堦除裏，顿使心无一点尘。', '扁舟又向镜中行，小草清诗取次成。放逐尚非余子比，清风明月入台评。', '冥搜窃叹眼俱高，我欲还家备百牢。三十三人齐上去，举杯帆外送洪涛。']\n",
      "2022-08-13 09:07:40.944 | DEBUG    | __main__:count_matches:11 - preds: [',。', ',。', ',。', ',。', ',。', ',。', ',。', ',。', ',。', ',。']\n",
      "2022-08-13 09:07:40.945 | DEBUG    | __main__:count_matches:13 - match: 0.899179292929293\n",
      "2022-08-13 09:07:40.945 | INFO     | textgen.t5.t5_model:eval_model:940 - {'eval_loss': 7.580060005187988, 'matches': 0.899179292929293}\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "e6469f27af3c4871ad89a69584198a95",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Running Epoch 1 of 10:   0%|          | 0/10 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:07:47.943 | INFO     | textgen.t5.t5_utils:__init__:139 -  Creating features from dataset file at cache_dir/\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "b345fadac06344999f41f675ff5d423f",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "  0%|          | 0/30 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:07:47.983 | INFO     | textgen.t5.t5_utils:__init__:170 -  Saving features into cached file cache_dir/Langboat_mengzi-t5-base_cached_5030\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "c7f1e5eb805a4726a32bf2d0c7580c0f",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Generating outputs:   0%|          | 0/4 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:07:49.994 | DEBUG    | __main__:count_matches:10 - labels: ['禀此分斗姿，用舍在所激。翻跳巧相中，一败躯命掷。晨鷄鸣不渝，霜隼时乃击。既无一二效，岂不愧肉食。', '东湖湖面波渺弥，东湖岸上春土肥。先生鉏云明月晓，种来蔬甲今成畦。把茅萧萧环四壁，此身不愿人间识。干坤清夷那复知，寸心杳渺黄尘隔。', '梢梢两竹枝，甘露叶间垂。草木有灵液，阴阳凝以时。深山与穷谷，往往尝有之。幸当君子轩，得爲众人知。物生随所托，晦显各有宜。聊以助歌', '精详语议四门开，舒惨阳和意外裁。远见风尘思往事，无穷日月去还来。乐耶指趣归三体，周旋道理遍九垓。贤圣人天常法则，卿云岭上白皑皑。', '使臣怀饯席，亚尹有前溪。客是仙舟裏，途从御苑西。泉声喧暗竹，草色引长堤。故绛青山在，新田绿树齐。天秋闻别鹄，关晓待鸣鸡。应叹沉冥', '饭余临槛数龟鱼，蛙黾跳浪亦任渠。笼寄双鳬古灵去，不因羽客换鹅书。', '阴阴作雨只漫漫，今日虽霜未苦寒。归去襄阳见吾弟，爲言道路且平安。', '天与孤高花独新，世间草木信非伦。影涵水月不受彩，气傲冰霜何待春。冷淡自能驱俗客，风骚端合付幽人。往来百匝堦除裏，顿使心无一点尘。', '扁舟又向镜中行，小草清诗取次成。放逐尚非余子比，清风明月入台评。', '冥搜窃叹眼俱高，我欲还家备百牢。三十三人齐上去，举杯帆外送洪涛。']\n",
      "2022-08-13 09:07:49.995 | DEBUG    | __main__:count_matches:11 - preds: ['', ',', '饮客', ',', ',', '', ',', '梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅梅', ',', ',']\n",
      "2022-08-13 09:07:49.995 | DEBUG    | __main__:count_matches:13 - match: 0.6602904040404042\n",
      "2022-08-13 09:07:49.996 | INFO     | textgen.t5.t5_model:eval_model:940 - {'eval_loss': 7.143990516662598, 'matches': 0.6602904040404042}\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "980b976cfc864a369fa801a090f18579",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Running Epoch 2 of 10:   0%|          | 0/10 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:07:56.932 | INFO     | textgen.t5.t5_utils:__init__:139 -  Creating features from dataset file at cache_dir/\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "d04e235c804546f59070c356ae71c142",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "  0%|          | 0/30 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:07:56.966 | INFO     | textgen.t5.t5_utils:__init__:170 -  Saving features into cached file cache_dir/Langboat_mengzi-t5-base_cached_5030\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "3b79890442ec4fbea0977c9bbb4ecff5",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Generating outputs:   0%|          | 0/4 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:07:57.300 | DEBUG    | __main__:count_matches:10 - labels: ['禀此分斗姿，用舍在所激。翻跳巧相中，一败躯命掷。晨鷄鸣不渝，霜隼时乃击。既无一二效，岂不愧肉食。', '东湖湖面波渺弥，东湖岸上春土肥。先生鉏云明月晓，种来蔬甲今成畦。把茅萧萧环四壁，此身不愿人间识。干坤清夷那复知，寸心杳渺黄尘隔。', '梢梢两竹枝，甘露叶间垂。草木有灵液，阴阳凝以时。深山与穷谷，往往尝有之。幸当君子轩，得爲众人知。物生随所托，晦显各有宜。聊以助歌', '精详语议四门开，舒惨阳和意外裁。远见风尘思往事，无穷日月去还来。乐耶指趣归三体，周旋道理遍九垓。贤圣人天常法则，卿云岭上白皑皑。', '使臣怀饯席，亚尹有前溪。客是仙舟裏，途从御苑西。泉声喧暗竹，草色引长堤。故绛青山在，新田绿树齐。天秋闻别鹄，关晓待鸣鸡。应叹沉冥', '饭余临槛数龟鱼，蛙黾跳浪亦任渠。笼寄双鳬古灵去，不因羽客换鹅书。', '阴阴作雨只漫漫，今日虽霜未苦寒。归去襄阳见吾弟，爲言道路且平安。', '天与孤高花独新，世间草木信非伦。影涵水月不受彩，气傲冰霜何待春。冷淡自能驱俗客，风骚端合付幽人。往来百匝堦除裏，顿使心无一点尘。', '扁舟又向镜中行，小草清诗取次成。放逐尚非余子比，清风明月入台评。', '冥搜窃叹眼俱高，我欲还家备百牢。三十三人齐上去，举杯帆外送洪涛。']\n",
      "2022-08-13 09:07:57.300 | DEBUG    | __main__:count_matches:11 - preds: [',', ',', ',', ',', ',', ',', ',', ',', ',', ',']\n",
      "2022-08-13 09:07:57.301 | DEBUG    | __main__:count_matches:13 - match: 0.899179292929293\n",
      "2022-08-13 09:07:57.302 | INFO     | textgen.t5.t5_model:eval_model:940 - {'eval_loss': 7.250778436660767, 'matches': 0.899179292929293}\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "9788beff834040d39c588fc1620c9adf",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Running Epoch 3 of 10:   0%|          | 0/10 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:08:00.437 | INFO     | textgen.t5.t5_utils:__init__:139 -  Creating features from dataset file at cache_dir/\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "9fc0799b4dcc45f39383a3ef9cb52177",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "  0%|          | 0/30 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:08:00.470 | INFO     | textgen.t5.t5_utils:__init__:170 -  Saving features into cached file cache_dir/Langboat_mengzi-t5-base_cached_5030\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "66c86e5a2c9a469da2c957560b99b810",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Generating outputs:   0%|          | 0/4 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:08:04.383 | DEBUG    | __main__:count_matches:10 - labels: ['禀此分斗姿，用舍在所激。翻跳巧相中，一败躯命掷。晨鷄鸣不渝，霜隼时乃击。既无一二效，岂不愧肉食。', '东湖湖面波渺弥，东湖岸上春土肥。先生鉏云明月晓，种来蔬甲今成畦。把茅萧萧环四壁，此身不愿人间识。干坤清夷那复知，寸心杳渺黄尘隔。', '梢梢两竹枝，甘露叶间垂。草木有灵液，阴阳凝以时。深山与穷谷，往往尝有之。幸当君子轩，得爲众人知。物生随所托，晦显各有宜。聊以助歌', '精详语议四门开，舒惨阳和意外裁。远见风尘思往事，无穷日月去还来。乐耶指趣归三体，周旋道理遍九垓。贤圣人天常法则，卿云岭上白皑皑。', '使臣怀饯席，亚尹有前溪。客是仙舟裏，途从御苑西。泉声喧暗竹，草色引长堤。故绛青山在，新田绿树齐。天秋闻别鹄，关晓待鸣鸡。应叹沉冥', '饭余临槛数龟鱼，蛙黾跳浪亦任渠。笼寄双鳬古灵去，不因羽客换鹅书。', '阴阴作雨只漫漫，今日虽霜未苦寒。归去襄阳见吾弟，爲言道路且平安。', '天与孤高花独新，世间草木信非伦。影涵水月不受彩，气傲冰霜何待春。冷淡自能驱俗客，风骚端合付幽人。往来百匝堦除裏，顿使心无一点尘。', '扁舟又向镜中行，小草清诗取次成。放逐尚非余子比，清风明月入台评。', '冥搜窃叹眼俱高，我欲还家备百牢。三十三人齐上去，举杯帆外送洪涛。']\n",
      "2022-08-13 09:08:04.384 | DEBUG    | __main__:count_matches:11 - preds: [',碧瑶幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢', ',碧瑶幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢', ',碧瑶幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢', ',碧瑶幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢', ',水,水,水,水,水,水,水,水,水,水,水,水,水,水,水,水,水,水,水,水,水,水,水,水,', ',碧瑶幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢', ',公,公,公,公,公,公,公,公,公,公,公,公,公,公,公,公,公,公,公,公,公,公,公,公,', ',碧瑶幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢幢', ',不复,不复,不复,不复,不复,不复,不复,不复,不复,不复,不复,不复,不复,不复,不复,不复,', ',,,,,,,,,,,,,,,,,,,,,,,,,']\n",
      "2022-08-13 09:08:04.385 | DEBUG    | __main__:count_matches:13 - match: 0.8274083307565452\n",
      "2022-08-13 09:08:04.386 | INFO     | textgen.t5.t5_model:eval_model:940 - {'eval_loss': 7.109241843223572, 'matches': 0.8274083307565452}\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "62ca7c21b4b246819416cf0df25e00c4",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Running Epoch 4 of 10:   0%|          | 0/10 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:08:11.313 | INFO     | textgen.t5.t5_utils:__init__:139 -  Creating features from dataset file at cache_dir/\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "0a79f1d016e84a599deabd94cf062f17",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "  0%|          | 0/30 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:08:11.351 | INFO     | textgen.t5.t5_utils:__init__:170 -  Saving features into cached file cache_dir/Langboat_mengzi-t5-base_cached_5030\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "20e7f031dd0743d8a88e7ef1a5efe500",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Generating outputs:   0%|          | 0/4 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:08:15.177 | DEBUG    | __main__:count_matches:10 - labels: ['禀此分斗姿，用舍在所激。翻跳巧相中，一败躯命掷。晨鷄鸣不渝，霜隼时乃击。既无一二效，岂不愧肉食。', '东湖湖面波渺弥，东湖岸上春土肥。先生鉏云明月晓，种来蔬甲今成畦。把茅萧萧环四壁，此身不愿人间识。干坤清夷那复知，寸心杳渺黄尘隔。', '梢梢两竹枝，甘露叶间垂。草木有灵液，阴阳凝以时。深山与穷谷，往往尝有之。幸当君子轩，得爲众人知。物生随所托，晦显各有宜。聊以助歌', '精详语议四门开，舒惨阳和意外裁。远见风尘思往事，无穷日月去还来。乐耶指趣归三体，周旋道理遍九垓。贤圣人天常法则，卿云岭上白皑皑。', '使臣怀饯席，亚尹有前溪。客是仙舟裏，途从御苑西。泉声喧暗竹，草色引长堤。故绛青山在，新田绿树齐。天秋闻别鹄，关晓待鸣鸡。应叹沉冥', '饭余临槛数龟鱼，蛙黾跳浪亦任渠。笼寄双鳬古灵去，不因羽客换鹅书。', '阴阴作雨只漫漫，今日虽霜未苦寒。归去襄阳见吾弟，爲言道路且平安。', '天与孤高花独新，世间草木信非伦。影涵水月不受彩，气傲冰霜何待春。冷淡自能驱俗客，风骚端合付幽人。往来百匝堦除裏，顿使心无一点尘。', '扁舟又向镜中行，小草清诗取次成。放逐尚非余子比，清风明月入台评。', '冥搜窃叹眼俱高，我欲还家备百牢。三十三人齐上去，举杯帆外送洪涛。']\n",
      "2022-08-13 09:08:15.177 | DEBUG    | __main__:count_matches:11 - preds: ['北洗山远近,北洗山远近,北洗山远近,北洗山远近,北洗山远近,北洗山远近,北洗山远近,北洗山远近,北洗山远近,北洗山远近', '江路,江路,江路,江路,江路,江路,江路,江路,江路,江路,江路,江路,江路,江路,江路,江路,江', '竹影,竹影松间,竹影,竹影松间,竹影,竹影松间,竹影,竹影,竹影,竹影,竹影,竹影,竹影,竹影,竹', '北洗山远近,北洗山远近,北洗山远近,北洗山远近,北洗山远近,北洗山远近,北洗山远近,北洗山远近,北洗山远近,北洗山远近', '北洗山远近,北洗山远近,北洗山远近,北洗山远近,北洗山远近,北洗山远近,北洗山远近,北,北洗山远近,北,北洗山远近,', '小小回,小,小,小,小,小,小,小,小,小,小,小,小,小,小,小,小,小,小,小,小,小,小,小,', '老,一付,一付,一付,一付,一付,一付,一付,一付,一付,一付,一付,一付,一付,一付,一付,一付', '小小回,飞。飞。飞。飞。飞。飞。飞。飞。飞。飞。飞。飞。飞。飞。飞。飞。飞。飞。飞。飞。飞。飞。飞。', '老,一付,一付,一付,一付,一付,一付,一付,一付,一付,一付,一付,一付,一付,一付,一付,一付', '小小回,小篆,小篆,小篆,小篆,小篆,小篆,小篆,小篆,小篆,小篆,小篆,小篆,小篆,小篆,小篆,小']\n",
      "2022-08-13 09:08:15.178 | DEBUG    | __main__:count_matches:13 - match: 0.7957382978854515\n",
      "2022-08-13 09:08:15.179 | INFO     | textgen.t5.t5_model:eval_model:940 - {'eval_loss': 7.611654162406921, 'matches': 0.7957382978854515}\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "5ff7e81cc5d247d9942f7aa91817aa85",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Running Epoch 5 of 10:   0%|          | 0/10 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:08:18.334 | INFO     | textgen.t5.t5_utils:__init__:139 -  Creating features from dataset file at cache_dir/\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "8f4c4eb888d448d2a8b9ee5728fca1ef",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "  0%|          | 0/30 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:08:18.368 | INFO     | textgen.t5.t5_utils:__init__:170 -  Saving features into cached file cache_dir/Langboat_mengzi-t5-base_cached_5030\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "93926b5eaf014ff7ba22a671d890e77a",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Generating outputs:   0%|          | 0/4 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:08:22.261 | DEBUG    | __main__:count_matches:10 - labels: ['禀此分斗姿，用舍在所激。翻跳巧相中，一败躯命掷。晨鷄鸣不渝，霜隼时乃击。既无一二效，岂不愧肉食。', '东湖湖面波渺弥，东湖岸上春土肥。先生鉏云明月晓，种来蔬甲今成畦。把茅萧萧环四壁，此身不愿人间识。干坤清夷那复知，寸心杳渺黄尘隔。', '梢梢两竹枝，甘露叶间垂。草木有灵液，阴阳凝以时。深山与穷谷，往往尝有之。幸当君子轩，得爲众人知。物生随所托，晦显各有宜。聊以助歌', '精详语议四门开，舒惨阳和意外裁。远见风尘思往事，无穷日月去还来。乐耶指趣归三体，周旋道理遍九垓。贤圣人天常法则，卿云岭上白皑皑。', '使臣怀饯席，亚尹有前溪。客是仙舟裏，途从御苑西。泉声喧暗竹，草色引长堤。故绛青山在，新田绿树齐。天秋闻别鹄，关晓待鸣鸡。应叹沉冥', '饭余临槛数龟鱼，蛙黾跳浪亦任渠。笼寄双鳬古灵去，不因羽客换鹅书。', '阴阴作雨只漫漫，今日虽霜未苦寒。归去襄阳见吾弟，爲言道路且平安。', '天与孤高花独新，世间草木信非伦。影涵水月不受彩，气傲冰霜何待春。冷淡自能驱俗客，风骚端合付幽人。往来百匝堦除裏，顿使心无一点尘。', '扁舟又向镜中行，小草清诗取次成。放逐尚非余子比，清风明月入台评。', '冥搜窃叹眼俱高，我欲还家备百牢。三十三人齐上去，举杯帆外送洪涛。']\n",
      "2022-08-13 09:08:22.262 | DEBUG    | __main__:count_matches:11 - preds: ['顽童愚者惟有爱子,灵树怕伤神助,灵树怕伤神助,灵树怕伤神助,灵树怕伤神助,灵树怕伤神助人谒朝装耳谢', '忆昨东来护印章,今亲见爲霖雨报国使初通明犹落寞不堪传无穷哀荣然四海驰。吾方幸迩亲见爲霖雨报国使羣贤者言天下将踵', '竹杖生石杖生石杖生石杖生石杖生石杖生石杖生石杖生石杖生石杖生石杖生石杖生石杖生石杖生石杖生石杖生石', '箕岭逃尧陵蛮苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍苍', '初通者言不在舌,言不在舌,言不在舌,言不在舌,言不在舌,言不在舌,言不在舌,言不在舌,言不在舌,言不在舌,言不在舌,言不在', '羽两逶迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤迤', '我生灭身老夫君心怯拟信人间老夫君心怯拟信人间老夫君心怯拟信人间老夫君心怯拟信人间老夫君心怯拟信人间老夫君心怯', '春心撩乱强拘束拄杖杖杖生枝头飞雪枝头飞雪枝头飞雪枝头飞雪枝头飞雪枝头飞雪枝头飞雪枝头飞雪枝头飞雪枝', '百年如许,百千怀抱转荒唐不堪传无穷。嗟哉,残书终不同,残书终不同,残书终不同,残书终不同下度长年犹落寞,残书终不同下度长', '学者行道义,知身老夫始信之言偿命将踵传无穷目昏鼠首传无穷目昏鼠首传无穷目昏鼠首传无穷目昏鼠窥研习习习习习习习']\n",
      "2022-08-13 09:08:22.263 | DEBUG    | __main__:count_matches:13 - match: 1.075484612309146\n",
      "2022-08-13 09:08:22.264 | INFO     | textgen.t5.t5_model:eval_model:940 - {'eval_loss': 8.455054998397827, 'matches': 1.075484612309146}\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "646019abb0eb493190334e4e2d26722a",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Running Epoch 6 of 10:   0%|          | 0/10 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:08:25.429 | INFO     | textgen.t5.t5_utils:__init__:139 -  Creating features from dataset file at cache_dir/\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "54310a131b614ee383031de285cc37fe",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "  0%|          | 0/30 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:08:25.467 | INFO     | textgen.t5.t5_utils:__init__:170 -  Saving features into cached file cache_dir/Langboat_mengzi-t5-base_cached_5030\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "36fb413d195c40f88be37c023a247b75",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Generating outputs:   0%|          | 0/4 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:08:28.673 | DEBUG    | __main__:count_matches:10 - labels: ['禀此分斗姿，用舍在所激。翻跳巧相中，一败躯命掷。晨鷄鸣不渝，霜隼时乃击。既无一二效，岂不愧肉食。', '东湖湖面波渺弥，东湖岸上春土肥。先生鉏云明月晓，种来蔬甲今成畦。把茅萧萧环四壁，此身不愿人间识。干坤清夷那复知，寸心杳渺黄尘隔。', '梢梢两竹枝，甘露叶间垂。草木有灵液，阴阳凝以时。深山与穷谷，往往尝有之。幸当君子轩，得爲众人知。物生随所托，晦显各有宜。聊以助歌', '精详语议四门开，舒惨阳和意外裁。远见风尘思往事，无穷日月去还来。乐耶指趣归三体，周旋道理遍九垓。贤圣人天常法则，卿云岭上白皑皑。', '使臣怀饯席，亚尹有前溪。客是仙舟裏，途从御苑西。泉声喧暗竹，草色引长堤。故绛青山在，新田绿树齐。天秋闻别鹄，关晓待鸣鸡。应叹沉冥', '饭余临槛数龟鱼，蛙黾跳浪亦任渠。笼寄双鳬古灵去，不因羽客换鹅书。', '阴阴作雨只漫漫，今日虽霜未苦寒。归去襄阳见吾弟，爲言道路且平安。', '天与孤高花独新，世间草木信非伦。影涵水月不受彩，气傲冰霜何待春。冷淡自能驱俗客，风骚端合付幽人。往来百匝堦除裏，顿使心无一点尘。', '扁舟又向镜中行，小草清诗取次成。放逐尚非余子比，清风明月入台评。', '冥搜窃叹眼俱高，我欲还家备百牢。三十三人齐上去，举杯帆外送洪涛。']\n",
      "2022-08-13 09:08:28.673 | DEBUG    | __main__:count_matches:11 - preds: ['山如有待,天上月明。', '玉辇曾经陷楚水云,汉皇心怯拟休兵。', '翠湿蒿藜。', '纵横尸暴积,妖啸空营。', '长亭岁尽雪如波万顷,日月须分一半明。', '羽觞。', '长亭岁尽雪如波万顷,逢君心怯拟休闻道在他何知。', '天台后,雪如波万顷尽雪如波万顷刻是屠龙手提老,雪如闻道在他何用何用何用何用何用何用何用何用何用何用何', '百年地辟有识爲嗟咨。', '天台后诗示羣儿辈窥大小苏,诗寻。']\n",
      "2022-08-13 09:08:28.674 | DEBUG    | __main__:count_matches:13 - match: 1.1538416815742398\n",
      "2022-08-13 09:08:28.675 | INFO     | textgen.t5.t5_model:eval_model:940 - {'eval_loss': 8.9949791431427, 'matches': 1.1538416815742398}\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "90612243831941ce99f2c0ccb1cacf5a",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Running Epoch 7 of 10:   0%|          | 0/10 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:08:31.852 | INFO     | textgen.t5.t5_utils:__init__:139 -  Creating features from dataset file at cache_dir/\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "314c7c1d12bf419f9b4f1ad7b3768e82",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "  0%|          | 0/30 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:08:31.885 | INFO     | textgen.t5.t5_utils:__init__:170 -  Saving features into cached file cache_dir/Langboat_mengzi-t5-base_cached_5030\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "ee41d77782034fbc885af160a053a341",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Generating outputs:   0%|          | 0/4 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:08:35.534 | DEBUG    | __main__:count_matches:10 - labels: ['禀此分斗姿，用舍在所激。翻跳巧相中，一败躯命掷。晨鷄鸣不渝，霜隼时乃击。既无一二效，岂不愧肉食。', '东湖湖面波渺弥，东湖岸上春土肥。先生鉏云明月晓，种来蔬甲今成畦。把茅萧萧环四壁，此身不愿人间识。干坤清夷那复知，寸心杳渺黄尘隔。', '梢梢两竹枝，甘露叶间垂。草木有灵液，阴阳凝以时。深山与穷谷，往往尝有之。幸当君子轩，得爲众人知。物生随所托，晦显各有宜。聊以助歌', '精详语议四门开，舒惨阳和意外裁。远见风尘思往事，无穷日月去还来。乐耶指趣归三体，周旋道理遍九垓。贤圣人天常法则，卿云岭上白皑皑。', '使臣怀饯席，亚尹有前溪。客是仙舟裏，途从御苑西。泉声喧暗竹，草色引长堤。故绛青山在，新田绿树齐。天秋闻别鹄，关晓待鸣鸡。应叹沉冥', '饭余临槛数龟鱼，蛙黾跳浪亦任渠。笼寄双鳬古灵去，不因羽客换鹅书。', '阴阴作雨只漫漫，今日虽霜未苦寒。归去襄阳见吾弟，爲言道路且平安。', '天与孤高花独新，世间草木信非伦。影涵水月不受彩，气傲冰霜何待春。冷淡自能驱俗客，风骚端合付幽人。往来百匝堦除裏，顿使心无一点尘。', '扁舟又向镜中行，小草清诗取次成。放逐尚非余子比，清风明月入台评。', '冥搜窃叹眼俱高，我欲还家备百牢。三十三人齐上去，举杯帆外送洪涛。']\n",
      "2022-08-13 09:08:35.535 | DEBUG    | __main__:count_matches:11 - preds: ['山裏药多人不识,神仙今如此。', '江上逢星使,江上青茸,江声暂去,烁晚色寒苍然欲吐胸中。', '翠节摩秋晚种,覆块青茸。天堑,山麓山麓山麓山麓山麓山麓山麓山麓山麓山麓山麓山麓山麓山麓山麓山麓山麓', '韩子其难教恋小鱼鸟,温水难教恋小鱼鸟,温水难教恋小鱼鸟,温水难教恋小鱼鸟,温水难教恋小鱼鸟,温水难教恋小鱼鸟,温水难教恋小鱼', '白鹿晨湍迥,流水记旧俗,客心俱杀青茸。客心俱杀青茸。客心俱杀青茸。客心俱杀青茸,客心俱杀青茸。客心俱', '长向古坛朝序,羣仙树出九芙蓉遮女何羡君移植更幽寻破陇图间金闺。庖厨朝鸡不逾,西雍容有典型。庖厨朝饭,西雍', '长乐,细葛含素,细葛含素,细葛含素,细葛含素,细葛含素,细葛含素,细葛含素,细葛含素,细葛含素,细', '今日移床试幽寻破陇图。今日移床试幽寻破陇图间藕池,往往属田舍浑迷姑射,往往属田舍浑迷姑射,往往属田舍浑迷姑射', '黄山谷,白鸟飞。此会良已长。此会良已长。自得少踟躅,羣仙树不逾,羣仙树不逾,羣仙树不逾,羣仙树不逾,', '江上逢星使,东南王气浓。天河出九芙蓉遮女何异,西雍容有典型。天河朔黎元陷虏庭前柏。天河朔黎元陷虏庭前柏。']\n",
      "2022-08-13 09:08:35.536 | DEBUG    | __main__:count_matches:13 - match: 1.0987181517083602\n",
      "2022-08-13 09:08:35.536 | INFO     | textgen.t5.t5_model:eval_model:940 - {'eval_loss': 9.600939989089966, 'matches': 1.0987181517083602}\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "fdc076cfad784bbc82dee2603b99e5fc",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Running Epoch 8 of 10:   0%|          | 0/10 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:08:38.700 | INFO     | textgen.t5.t5_utils:__init__:139 -  Creating features from dataset file at cache_dir/\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "13f6ba48a9734f2ea6470c084d6d2780",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "  0%|          | 0/30 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:08:38.734 | INFO     | textgen.t5.t5_utils:__init__:170 -  Saving features into cached file cache_dir/Langboat_mengzi-t5-base_cached_5030\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "60e17a53ed424b05b628f3f7a5f2d8a0",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Generating outputs:   0%|          | 0/4 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:08:42.294 | DEBUG    | __main__:count_matches:10 - labels: ['禀此分斗姿，用舍在所激。翻跳巧相中，一败躯命掷。晨鷄鸣不渝，霜隼时乃击。既无一二效，岂不愧肉食。', '东湖湖面波渺弥，东湖岸上春土肥。先生鉏云明月晓，种来蔬甲今成畦。把茅萧萧环四壁，此身不愿人间识。干坤清夷那复知，寸心杳渺黄尘隔。', '梢梢两竹枝，甘露叶间垂。草木有灵液，阴阳凝以时。深山与穷谷，往往尝有之。幸当君子轩，得爲众人知。物生随所托，晦显各有宜。聊以助歌', '精详语议四门开，舒惨阳和意外裁。远见风尘思往事，无穷日月去还来。乐耶指趣归三体，周旋道理遍九垓。贤圣人天常法则，卿云岭上白皑皑。', '使臣怀饯席，亚尹有前溪。客是仙舟裏，途从御苑西。泉声喧暗竹，草色引长堤。故绛青山在，新田绿树齐。天秋闻别鹄，关晓待鸣鸡。应叹沉冥', '饭余临槛数龟鱼，蛙黾跳浪亦任渠。笼寄双鳬古灵去，不因羽客换鹅书。', '阴阴作雨只漫漫，今日虽霜未苦寒。归去襄阳见吾弟，爲言道路且平安。', '天与孤高花独新，世间草木信非伦。影涵水月不受彩，气傲冰霜何待春。冷淡自能驱俗客，风骚端合付幽人。往来百匝堦除裏，顿使心无一点尘。', '扁舟又向镜中行，小草清诗取次成。放逐尚非余子比，清风明月入台评。', '冥搜窃叹眼俱高，我欲还家备百牢。三十三人齐上去，举杯帆外送洪涛。']\n",
      "2022-08-13 09:08:42.295 | DEBUG    | __main__:count_matches:11 - preds: ['山裏曹刘电,阿瞒独倚羊肠断白鹿上青天门无睡蝉老颠。', '窜逐三年海上开北陆沉海底船。', '翠竹翠竹翠竹翠竹翠竹翠竹翠竹翠竹翠竹翠竹翠竹翠竹翠竹翠竹翠竹翠竹翠竹翠竹翠成阴云千叠势争翻自惭面目久', '狂歌白鹿上青茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸茸', '自惭面目久尘埃,坐对方来客住三顾吏淮海,', '羽林塘钓紫烟翠雾空迷茫,饮无云自惭面目久尘埃,饮无。', '自惭面目久尘埃,无心贪晓色,高谈往事几心酸。', '天公飞雪如山中,天公飞雪枝间早占取山中。', '狂歌白鹿上青天,共一觞。', '于时宣尼,从心不遇坎,从心不遇坎,从心不遇坎,从心不遇坎,从心不遇坎,从心不遇坎,从心不遇坎,从心']\n",
      "2022-08-13 09:08:42.296 | DEBUG    | __main__:count_matches:13 - match: 1.1469132445255719\n",
      "2022-08-13 09:08:42.296 | INFO     | textgen.t5.t5_model:eval_model:940 - {'eval_loss': 9.961154222488403, 'matches': 1.1469132445255719}\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "8f7f6b3431114227ae3e83bf89ba01a9",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Running Epoch 9 of 10:   0%|          | 0/10 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:08:45.466 | INFO     | textgen.t5.t5_utils:__init__:139 -  Creating features from dataset file at cache_dir/\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "a7ad5d6b63434a19a95167f036f8032f",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "  0%|          | 0/30 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:08:45.500 | INFO     | textgen.t5.t5_utils:__init__:170 -  Saving features into cached file cache_dir/Langboat_mengzi-t5-base_cached_5030\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "5b415b5905fd4aec9cb94e7ce5206e0f",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Generating outputs:   0%|          | 0/4 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:08:49.269 | DEBUG    | __main__:count_matches:10 - labels: ['禀此分斗姿，用舍在所激。翻跳巧相中，一败躯命掷。晨鷄鸣不渝，霜隼时乃击。既无一二效，岂不愧肉食。', '东湖湖面波渺弥，东湖岸上春土肥。先生鉏云明月晓，种来蔬甲今成畦。把茅萧萧环四壁，此身不愿人间识。干坤清夷那复知，寸心杳渺黄尘隔。', '梢梢两竹枝，甘露叶间垂。草木有灵液，阴阳凝以时。深山与穷谷，往往尝有之。幸当君子轩，得爲众人知。物生随所托，晦显各有宜。聊以助歌', '精详语议四门开，舒惨阳和意外裁。远见风尘思往事，无穷日月去还来。乐耶指趣归三体，周旋道理遍九垓。贤圣人天常法则，卿云岭上白皑皑。', '使臣怀饯席，亚尹有前溪。客是仙舟裏，途从御苑西。泉声喧暗竹，草色引长堤。故绛青山在，新田绿树齐。天秋闻别鹄，关晓待鸣鸡。应叹沉冥', '饭余临槛数龟鱼，蛙黾跳浪亦任渠。笼寄双鳬古灵去，不因羽客换鹅书。', '阴阴作雨只漫漫，今日虽霜未苦寒。归去襄阳见吾弟，爲言道路且平安。', '天与孤高花独新，世间草木信非伦。影涵水月不受彩，气傲冰霜何待春。冷淡自能驱俗客，风骚端合付幽人。往来百匝堦除裏，顿使心无一点尘。', '扁舟又向镜中行，小草清诗取次成。放逐尚非余子比，清风明月入台评。', '冥搜窃叹眼俱高，我欲还家备百牢。三十三人齐上去，举杯帆外送洪涛。']\n",
      "2022-08-13 09:08:49.270 | DEBUG    | __main__:count_matches:11 - preds: ['遥想行舟解携。风前松巅鹤唳,风雨多。小苑接侯家,风雨多。小苑接侯家,风雨多。小苑接侯家,风雨多。小苑接侯家', '江清时,江清笳吹月雁斜行舟楫深。商山色时吹月雁斜行舟楫深魂夢,香囊覆舟楫深魂夢,歌管弦切切切切切', '几许,几许,几许,几许,几许,几许,几许,几许,几许,几许,几许,几许,几许,几许,几许,几许,几', '风物无乱云澹,。褰旒是太平。洪', '渭汝是山。褰旒是水珠玉版野水石,宫。褰旒。褰旒。褰旒。商山', '不悟居,孙通。洪', '出水莲花比性灵,神。天河争起浪,道主,道主,道主,道主,道主,道主,道主,道主,道主,道主,道主,道主', '闻道香寒卧雪枝,琼楼。天女何妨伴客,寒声暂去,腊月。天女何妨伴客,腊月。天女何妨伴客,腊月。天女何', '闲居一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一', '学者行道,敝。君子所令,君子所令,君子所令,君子所令,君子所令,君子所令,君子所令,君子所令,君子,君子,君子,君子,君子,']\n",
      "2022-08-13 09:08:49.271 | DEBUG    | __main__:count_matches:13 - match: 1.0310395719094367\n",
      "2022-08-13 09:08:49.272 | INFO     | textgen.t5.t5_model:eval_model:940 - {'eval_loss': 10.473383665084839, 'matches': 1.0310395719094367}\n",
      "2022-08-13 09:08:50.653 | INFO     | textgen.t5.t5_model:train_model:235 -  Training of Langboat/mengzi-t5-base model complete. Saved to outputs/mengzi_t5_poem/.\n",
      "2022-08-13 09:08:50.659 | INFO     | textgen.t5.t5_utils:__init__:139 -  Creating features from dataset file at cache_dir/\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "2c51a6e861024f76a72ad4fffa467313",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "  0%|          | 0/30 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:08:50.694 | INFO     | textgen.t5.t5_utils:__init__:170 -  Saving features into cached file cache_dir/Langboat_mengzi-t5-base_cached_5030\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "0b8e461d9218402caedea3e48197a72b",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Running Evaluation:   0%|          | 0/4 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "ba0bc610c1934299aa6ee6a5d2153f59",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Generating outputs:   0%|          | 0/4 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-08-13 09:08:54.452 | DEBUG    | __main__:count_matches:10 - labels: ['禀此分斗姿，用舍在所激。翻跳巧相中，一败躯命掷。晨鷄鸣不渝，霜隼时乃击。既无一二效，岂不愧肉食。', '东湖湖面波渺弥，东湖岸上春土肥。先生鉏云明月晓，种来蔬甲今成畦。把茅萧萧环四壁，此身不愿人间识。干坤清夷那复知，寸心杳渺黄尘隔。', '梢梢两竹枝，甘露叶间垂。草木有灵液，阴阳凝以时。深山与穷谷，往往尝有之。幸当君子轩，得爲众人知。物生随所托，晦显各有宜。聊以助歌', '精详语议四门开，舒惨阳和意外裁。远见风尘思往事，无穷日月去还来。乐耶指趣归三体，周旋道理遍九垓。贤圣人天常法则，卿云岭上白皑皑。', '使臣怀饯席，亚尹有前溪。客是仙舟裏，途从御苑西。泉声喧暗竹，草色引长堤。故绛青山在，新田绿树齐。天秋闻别鹄，关晓待鸣鸡。应叹沉冥', '饭余临槛数龟鱼，蛙黾跳浪亦任渠。笼寄双鳬古灵去，不因羽客换鹅书。', '阴阴作雨只漫漫，今日虽霜未苦寒。归去襄阳见吾弟，爲言道路且平安。', '天与孤高花独新，世间草木信非伦。影涵水月不受彩，气傲冰霜何待春。冷淡自能驱俗客，风骚端合付幽人。往来百匝堦除裏，顿使心无一点尘。', '扁舟又向镜中行，小草清诗取次成。放逐尚非余子比，清风明月入台评。', '冥搜窃叹眼俱高，我欲还家备百牢。三十三人齐上去，举杯帆外送洪涛。']\n",
      "2022-08-13 09:08:54.453 | DEBUG    | __main__:count_matches:11 - preds: ['遥想行舟解携。风前松巅鹤唳,风雨多。小苑接侯家,风雨多。小苑接侯家,风雨多。小苑接侯家,风雨多。小苑接侯家', '江清时,江清笳吹月雁斜行舟楫深。商山色时吹月雁斜行舟楫深魂夢,香囊覆舟楫深魂夢,歌管弦切切切切切', '几许,几许,几许,几许,几许,几许,几许,几许,几许,几许,几许,几许,几许,几许,几许,几许,几', '风物无乱云澹,。褰旒是太平。洪', '渭汝是山。褰旒是水珠玉版野水石,宫。褰旒。褰旒。褰旒。商山', '不悟居,孙通。洪', '出水莲花比性灵,神。天河争起浪,道主,道主,道主,道主,道主,道主,道主,道主,道主,道主,道主,道主', '闻道香寒卧雪枝,琼楼。天女何妨伴客,寒声暂去,腊月。天女何妨伴客,腊月。天女何妨伴客,腊月。天女何', '闲居一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一隅一', '学者行道,敝。君子所令,君子所令,君子所令,君子所令,君子所令,君子所令,君子所令,君子所令,君子,君子,君子,君子,君子,']\n",
      "2022-08-13 09:08:54.454 | DEBUG    | __main__:count_matches:13 - match: 1.0310395719094367\n",
      "2022-08-13 09:08:54.455 | INFO     | textgen.t5.t5_model:eval_model:940 - {'eval_loss': 10.473383665084839, 'matches': 1.0310395719094367}\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'eval_loss': 10.473383665084839, 'matches': 1.0310395719094367}\n"
     ]
    }
   ],
   "source": [
    "def sim_text_chars(text1, text2):\n",
    "    if not text1 or not text2:\n",
    "        return 0.0\n",
    "    same = set(text1) | set(text2)\n",
    "    m = len(same)\n",
    "    n = len(text1) if len(text1) > len(text2) else len(text2)\n",
    "    return m / n\n",
    "\n",
    "def count_matches(labels, preds):\n",
    "    logger.debug(f\"labels: {labels[:10]}\")\n",
    "    logger.debug(f\"preds: {preds[:10]}\")\n",
    "    match = sum([sim_text_chars(label, pred) for label, pred in zip(labels, preds)]) / len(labels)\n",
    "    logger.debug(f\"match: {match}\")\n",
    "    return match\n",
    "\n",
    "model.train_model(train_df, eval_data=eval_df, matches=count_matches)\n",
    "print(model.eval_model(eval_df, matches=count_matches))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Predict"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "inputs: ['过温汤']\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "0950b259a4d641359c6d9aff841ee57e",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Generating outputs:   0%|          | 0/1 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "outputs: ['山远钟鼎,往往属田舍。。。。。。。。。。。。。。。。。。。。']\n"
     ]
    }
   ],
   "source": [
    "predict_now([\"过温汤\"], model=model)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "本节完。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "accelerator": "GPU",
  "colab": {
   "collapsed_sections": [],
   "machine_shape": "hm",
   "name": "RC T5 Finetune Chinese Poem Writing V1",
   "provenance": []
  },
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  },
  "widgets": {
   "application/vnd.jupyter.widget-state+json": {
    "04bcb8d3d0ee4cab90101a22d358cbf4": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "09a526ec6d164b2090962a5781c3097a": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "0aebb7ab6f274f569061ba2f2c01a6e7": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_8880de85a4b14d5e9703a5df16ceb6c6",
      "placeholder": "​",
      "style": "IPY_MODEL_604fcc04d62d46d8b87e402401c0c924",
      "value": " 115/12921 [01:09&lt;2:07:50,  1.67it/s, loss=6.09, v_num=0, train_loss=6.010]"
     }
    },
    "0c3e05f620254eb0b9b0ba1a9e23655e": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_ac4f0c8888684075bd0a5bf047763641",
      "placeholder": "​",
      "style": "IPY_MODEL_74f4c31592a14f61bd1c93880b4099a6",
      "value": " 255/255 [02:08&lt;00:00,  4.82it/s]"
     }
    },
    "0d75d646fdd845c5946bffaf83c360f4": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_1b620ef6bf224e20b93cf805a75a84d9",
      "placeholder": "​",
      "style": "IPY_MODEL_31c4a5dd88824e58b56b3daf05ff7c6c",
      "value": "Validation sanity check:   0%"
     }
    },
    "0df136c92bef46eb8f0234f45874d07c": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": "inline-flex",
      "flex": null,
      "flex_flow": "row wrap",
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": "100%"
     }
    },
    "164b459cfb8a4a519e1e1dfb94ebf864": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "16b9d8d8b1154477b6feb23b76ed6f7a": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_babcd71231734f01b65bd59b87ab5237",
      "placeholder": "​",
      "style": "IPY_MODEL_8f2042c820b643669ebbbd18d61770e3",
      "value": "Dynasty song: 100%"
     }
    },
    "192177f838774e69b9dc03164e12fe3f": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "FloatProgressModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "FloatProgressModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "ProgressView",
      "bar_style": "success",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_a38e578963634fe8aaee4598915e8a63",
      "max": 725135,
      "min": 0,
      "orientation": "horizontal",
      "style": "IPY_MODEL_2b4801d6b14c4e00ba6881058ccef2c9",
      "value": 725135
     }
    },
    "1b620ef6bf224e20b93cf805a75a84d9": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "1d32d77e984649569fb475f479b5e05a": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": "2",
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "22ec341fcbd140649bc29b866efbba4c": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_a70858676a544d869b439aa65006b647",
      "placeholder": "​",
      "style": "IPY_MODEL_790a42639e5641219c4ea39cc9d723f9",
      "value": " 990M/990M [00:29&lt;00:00, 38.5MB/s]"
     }
    },
    "2709c8c8b756415aac3244c322d0cd6e": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_7d9f979f8c66439a846e7ab39b9043d7",
      "placeholder": "​",
      "style": "IPY_MODEL_09a526ec6d164b2090962a5781c3097a",
      "value": " 659/659 [00:00&lt;00:00, 18.4kB/s]"
     }
    },
    "275b4e7634324e51a3f2815a930046c9": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_d736a23a0e8f40b2bf65b3064f3513c7",
      "placeholder": "​",
      "style": "IPY_MODEL_04bcb8d3d0ee4cab90101a22d358cbf4",
      "value": "Downloading: 100%"
     }
    },
    "2b4801d6b14c4e00ba6881058ccef2c9": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "ProgressStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "ProgressStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "bar_color": null,
      "description_width": ""
     }
    },
    "2c7065d205de48e3be3f24e552dfe2eb": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "2fd2168d36e2400eb267577e6a05d7f6": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "31c4a5dd88824e58b56b3daf05ff7c6c": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "323d82ca0d4f45a4bc3a9e0c3fa7223f": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HBoxModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HBoxModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HBoxView",
      "box_style": "",
      "children": [
       "IPY_MODEL_dd67da684d514c0e9104af667687ec66",
       "IPY_MODEL_6fdf9feaca294f57a4bef18d4278964f",
       "IPY_MODEL_efc374010b0a48bb8185cb251176a5c6"
      ],
      "layout": "IPY_MODEL_d791ebd524c14fb39fa057b6d768d7e1"
     }
    },
    "3286b506ffc04ab486d307d42e0ffa52": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "FloatProgressModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "FloatProgressModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "ProgressView",
      "bar_style": "success",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_619a29e3e6864583b3c83d27c4b062fa",
      "max": 255,
      "min": 0,
      "orientation": "horizontal",
      "style": "IPY_MODEL_d9e6782917cb4db4a598efa86956e8b0",
      "value": 255
     }
    },
    "32f8fb07ad064e85b9c8fc2bbf0b0ad8": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "3596547df9124079846a0168971218ec": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "3c1198c7ce7a4093b1fdba455c074a35": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HBoxModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HBoxModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HBoxView",
      "box_style": "",
      "children": [
       "IPY_MODEL_0d75d646fdd845c5946bffaf83c360f4",
       "IPY_MODEL_5cb75bb247bf455789f3343fbf458194",
       "IPY_MODEL_d7a870de29374972903edf99e079381a"
      ],
      "layout": "IPY_MODEL_0df136c92bef46eb8f0234f45874d07c"
     }
    },
    "3f2a2563bd1d4824807bcde335b33ca0": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_54230e6b55274cecb2f6f4c034badf63",
      "placeholder": "​",
      "style": "IPY_MODEL_32f8fb07ad064e85b9c8fc2bbf0b0ad8",
      "value": "Epoch 0:   1%"
     }
    },
    "3ff6b9f98fb246149676f2d0d6ea5a74": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "FloatProgressModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "FloatProgressModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "ProgressView",
      "bar_style": "success",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_d9870f9f7cbb45758e676b3ca54f9be1",
      "max": 659,
      "min": 0,
      "orientation": "horizontal",
      "style": "IPY_MODEL_516004a73b27457d8ad8fe15256dc54b",
      "value": 659
     }
    },
    "50393dcc6d8f480fa4d75d3cd1091520": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "ProgressStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "ProgressStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "bar_color": null,
      "description_width": ""
     }
    },
    "516004a73b27457d8ad8fe15256dc54b": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "ProgressStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "ProgressStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "bar_color": null,
      "description_width": ""
     }
    },
    "54230e6b55274cecb2f6f4c034badf63": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "54c2e0f0aabe4b8db056a28e8470184d": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_8ae1328f6e2a4016932f5154e5e48a46",
      "placeholder": "​",
      "style": "IPY_MODEL_b63e60bfeeae4abc89db4684ed37ffac",
      "value": " 725k/725k [00:00&lt;00:00, 8.18MB/s]"
     }
    },
    "5cb75bb247bf455789f3343fbf458194": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "FloatProgressModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "FloatProgressModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "ProgressView",
      "bar_style": "danger",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_f214b269fd884b1c9a3a634d6784b18e",
      "max": 2,
      "min": 0,
      "orientation": "horizontal",
      "style": "IPY_MODEL_61d54ac5d2c749e482b3b6d51bc6b825",
      "value": 0
     }
    },
    "604fcc04d62d46d8b87e402401c0c924": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "619a29e3e6864583b3c83d27c4b062fa": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "61d54ac5d2c749e482b3b6d51bc6b825": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "ProgressStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "ProgressStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "bar_color": null,
      "description_width": ""
     }
    },
    "637c5f82daa846a3b95ce6914bd55e2b": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "FloatProgressModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "FloatProgressModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "ProgressView",
      "bar_style": "",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_1d32d77e984649569fb475f479b5e05a",
      "max": 12921,
      "min": 0,
      "orientation": "horizontal",
      "style": "IPY_MODEL_e4cd150df2d34df0bc66b22f60089e4e",
      "value": 115
     }
    },
    "6a5d1f41985540309d335af09ee3b9f8": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "6fdf9feaca294f57a4bef18d4278964f": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "FloatProgressModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "FloatProgressModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "ProgressView",
      "bar_style": "success",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_ac7cda3ef7b4438da21b97343149c342",
      "max": 58,
      "min": 0,
      "orientation": "horizontal",
      "style": "IPY_MODEL_867e0bde887f4cf99642971803035856",
      "value": 58
     }
    },
    "70a47bb0c68244f1b2e3bd063c703204": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "74f4c31592a14f61bd1c93880b4099a6": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "790a42639e5641219c4ea39cc9d723f9": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "7bd662007194408eabd5b4adf81f73dd": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "7d9f979f8c66439a846e7ab39b9043d7": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "867e0bde887f4cf99642971803035856": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "ProgressStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "ProgressStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "bar_color": null,
      "description_width": ""
     }
    },
    "8880de85a4b14d5e9703a5df16ceb6c6": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "8ae1328f6e2a4016932f5154e5e48a46": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "8d64b2cb15a544688df9b0ef4f5ac5d4": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_9fb2562090c4469786da59aae1c3cb50",
      "placeholder": "​",
      "style": "IPY_MODEL_db7b430a21394d47b3f510d3cd54918d",
      "value": "Downloading: 100%"
     }
    },
    "8f2042c820b643669ebbbd18d61770e3": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "95ff98cd1eba4fe999654378fe90ea50": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_d21de94ef23b41d098c5ce073e48ad95",
      "placeholder": "​",
      "style": "IPY_MODEL_6a5d1f41985540309d335af09ee3b9f8",
      "value": "Downloading: 100%"
     }
    },
    "9fb2562090c4469786da59aae1c3cb50": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "a38e578963634fe8aaee4598915e8a63": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "a70858676a544d869b439aa65006b647": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "aa33dc7fea834e2ab6d18c3332cc49fc": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": "inline-flex",
      "flex": null,
      "flex_flow": "row wrap",
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": "100%"
     }
    },
    "ab58b2c948274a1e858bb27bc5db1483": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "ac4f0c8888684075bd0a5bf047763641": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "ac7cda3ef7b4438da21b97343149c342": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "af835a288f37413d86415bf06fd69524": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "b63e60bfeeae4abc89db4684ed37ffac": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "babcd71231734f01b65bd59b87ab5237": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "c8a5e24211f24c488bb8c633d20d5185": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "ce5700274ea747a6bafeb693bffab4e7": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HBoxModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HBoxModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HBoxView",
      "box_style": "",
      "children": [
       "IPY_MODEL_3f2a2563bd1d4824807bcde335b33ca0",
       "IPY_MODEL_637c5f82daa846a3b95ce6914bd55e2b",
       "IPY_MODEL_0aebb7ab6f274f569061ba2f2c01a6e7"
      ],
      "layout": "IPY_MODEL_aa33dc7fea834e2ab6d18c3332cc49fc"
     }
    },
    "d21de94ef23b41d098c5ce073e48ad95": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "d736a23a0e8f40b2bf65b3064f3513c7": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "d791ebd524c14fb39fa057b6d768d7e1": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "d7a870de29374972903edf99e079381a": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_c8a5e24211f24c488bb8c633d20d5185",
      "placeholder": "​",
      "style": "IPY_MODEL_2fd2168d36e2400eb267577e6a05d7f6",
      "value": " 0/2 [00:00&lt;?, ?it/s]"
     }
    },
    "d84fd422478e4498bd387d71bc6973eb": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "FloatProgressModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "FloatProgressModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "ProgressView",
      "bar_style": "success",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_af835a288f37413d86415bf06fd69524",
      "max": 990389880,
      "min": 0,
      "orientation": "horizontal",
      "style": "IPY_MODEL_50393dcc6d8f480fa4d75d3cd1091520",
      "value": 990389880
     }
    },
    "d9870f9f7cbb45758e676b3ca54f9be1": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "d9e6782917cb4db4a598efa86956e8b0": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "ProgressStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "ProgressStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "bar_color": null,
      "description_width": ""
     }
    },
    "db7b430a21394d47b3f510d3cd54918d": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "dd67da684d514c0e9104af667687ec66": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_ef34932d46c24af7ba5ecfe75b66dd7d",
      "placeholder": "​",
      "style": "IPY_MODEL_70a47bb0c68244f1b2e3bd063c703204",
      "value": "Dynasty tang: 100%"
     }
    },
    "e4cd150df2d34df0bc66b22f60089e4e": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "ProgressStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "ProgressStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "bar_color": null,
      "description_width": ""
     }
    },
    "edb118578ca44cffa3ed79797997ce77": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HBoxModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HBoxModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HBoxView",
      "box_style": "",
      "children": [
       "IPY_MODEL_16b9d8d8b1154477b6feb23b76ed6f7a",
       "IPY_MODEL_3286b506ffc04ab486d307d42e0ffa52",
       "IPY_MODEL_0c3e05f620254eb0b9b0ba1a9e23655e"
      ],
      "layout": "IPY_MODEL_7bd662007194408eabd5b4adf81f73dd"
     }
    },
    "eef25f8bfc564f2bace3b033a0df5eb8": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HBoxModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HBoxModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HBoxView",
      "box_style": "",
      "children": [
       "IPY_MODEL_95ff98cd1eba4fe999654378fe90ea50",
       "IPY_MODEL_d84fd422478e4498bd387d71bc6973eb",
       "IPY_MODEL_22ec341fcbd140649bc29b866efbba4c"
      ],
      "layout": "IPY_MODEL_3596547df9124079846a0168971218ec"
     }
    },
    "ef34932d46c24af7ba5ecfe75b66dd7d": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "efc374010b0a48bb8185cb251176a5c6": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_2c7065d205de48e3be3f24e552dfe2eb",
      "placeholder": "​",
      "style": "IPY_MODEL_fe4e464186c34afa94351f1816565336",
      "value": " 58/58 [00:22&lt;00:00,  4.28it/s]"
     }
    },
    "f214b269fd884b1c9a3a634d6784b18e": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": "2",
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "f469bbd3377e48e9a0e1f1ec447a5d4c": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HBoxModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HBoxModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HBoxView",
      "box_style": "",
      "children": [
       "IPY_MODEL_8d64b2cb15a544688df9b0ef4f5ac5d4",
       "IPY_MODEL_3ff6b9f98fb246149676f2d0d6ea5a74",
       "IPY_MODEL_2709c8c8b756415aac3244c322d0cd6e"
      ],
      "layout": "IPY_MODEL_ab58b2c948274a1e858bb27bc5db1483"
     }
    },
    "f4c2d4d0e3eb483488808fccfb805039": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HBoxModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HBoxModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HBoxView",
      "box_style": "",
      "children": [
       "IPY_MODEL_275b4e7634324e51a3f2815a930046c9",
       "IPY_MODEL_192177f838774e69b9dc03164e12fe3f",
       "IPY_MODEL_54c2e0f0aabe4b8db056a28e8470184d"
      ],
      "layout": "IPY_MODEL_164b459cfb8a4a519e1e1dfb94ebf864"
     }
    },
    "fe4e464186c34afa94351f1816565336": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    }
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
